package com.ch08;

/**
 * @ClassName Teacher
 * @Description 修改懒汉式的线程问题
 * @Author Kx
 * @Date 2025/4/17 15:01
 * @Version 1.0
 */
public class Teacher {
    public static Teacher getInstance() {
        return TeacherHolder.teacher;
    }

    private static class TeacherHolder {
        private static final Teacher teacher = new Teacher();
    }
}
